/**
 * 俱乐部,
 * meta字段说明:
 *  title: 作为网页标题使用
 *  breadcrumb: 是否显示在面包屑导航上面
 *  disableBreadcrumb: 在面包屑导航上面点击是否会跳转
 */
import layout from '@components/layout'
import secondRouteView from '@components/secondRouteView'
const _import = file => () => import('@views/' + file + '.vue')
export default {
  path: '/club',
  name: 'club',
  meta: {
    breadcrumb: false,
    title: '俱乐部'
  },
  component: layout,
  children: [
    {
      path: 'rule',
      name: 'club.rule',
      meta: {
        breadcrumb: false,
        title: '菜单&权限'
      },
      component: secondRouteView,
      children: [
        {
          path: 'list/:pid(\\d+)?',
          name: 'club.rule.list',
          meta: {
            breadcrumb: true,
            title: '列表'
          },
          component: _import('club/rule/list')
        },
        {
          path: 'update/:id(\\d+)',
          name: 'club.rule.update',
          meta: {
            breadcrumb: true,
            title: '修改权限'
          },
          component: _import('club/rule/update')
        },
        {
          path: 'create/:pid(\\d+)?',
          name: 'club.rule.create',
          meta: {
            breadcrumb: true,
            title: '添加权限'
          },
          component: _import('club/rule/create')
        }
      ]
    },
    {
      path: 'setting',
      name: 'club.setting',
      meta: {
        breadcrumb: false,
        title: '设置'
      },
      component: secondRouteView,
      children: [
        {
          path: 'list/:pid(\\d+)?',
          name: 'club.setting.white.list',
          meta: {
            breadcrumb: true,
            title: '路由白名单'
          },
          component: _import('club/setting/ruleWhiteList')
        }
      ]
    },
    {
      path: 'manager',
      name: 'club.manager',
      meta: {
        breadcrumb: false,
        title: '俱乐部管理'
      },
      component: secondRouteView,
      children: [
        {
          path: 'list/:pid(\\d+)?',
          name: 'club.manager.list',
          meta: {
            breadcrumb: true,
            title: '俱乐部列表'
          },
          component: _import('club/manager/list')
        },
        {
          path: 'create',
          name: 'club.manager.create',
          meta: {
            breadcrumb: true,
            title: '创建俱乐部'
          },
          component: _import('club/manager/create')
        },
        {
          path: 'update',
          name: 'club.manager.update',
          meta: {
            breadcrumb: true,
            title: '修改俱乐部'
          },
          component: _import('club/manager/update')
        }
      ]
    }
  ]
}
